#include<iostream>
using namespace std;

bool selectsort(int a[],int len)
{
	if (len == 0 || len < 2)
	{
		return true;
	}
	for (int i = 0; i < len- 1; i++)
	{
		int minIndex = i;
		int tmp;
		for (int j = i+1; j < len; j++)
		{
			if (a[j] < a[minIndex])
			{
				minIndex = j;
				tmp = a[i];
				a[i] = a[j];
				a[j] = tmp;
			}
		}	
	}
	return true;
}
int main()
{
	int a[10] = { 2,3,5,11,43,75,65,82,9,10 };
	selectsort(a, 10);
	for (int i = 0; i < 10; i++)
	{
		cout << a[i] << " ";
	}
	return 0;
}